<?php
namespace Admin\Model;
use Think\Model;
class GoodsModel extends Model{
    /**
     * file upload
     * @return array|bool
     */
    public function upload(){
        $upload = new \Think\Upload();
        $upload->maxSize = 3145728 ;
        $upload->exts = array('jpg', 'gif', 'png', 'jpeg');
        $upload->savePath = '/Shop/Admin/Images/'; 
        $info = $upload->upload();
        if(!$info) {
            return false;
        }else{
            return $info;
        }
    }
}